package com.woniuxy.Filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * @auther linke
 * @create 2021-10-22 15:21
 * 通过配置web.xml文件的方式 使用filter过滤器
 */
public class FilterDemo01 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("filterDemo01...放行前");
        //chain.doFilter(request, response);//放行
        System.out.println("filterDemo01...放行后");
    }

    @Override
    public void destroy() {

    }
}
